package app;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @NacosValue(value = "${spring.datasource.username}",autoRefreshed = true)
    private String userName;

    @GetMapping("/username")
    public String username(){
        return userName;
    }
}
